package br.net.woodstock.tickettoride.vaadin.web;

import com.vaadin.terminal.Sizeable;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

public abstract class AbstractView extends VerticalLayout {

	private static final long	serialVersionUID	= 8417095477366528512L;

	public AbstractView() {
		super();
		this.init();
		this.setMargin(false);
		this.setSpacing(false);
		this.setWidth(780, Sizeable.UNITS_PIXELS);
	}

	protected void init() {
		//
	}

	protected Window getMainWindow() {
		TicketToRideApplication application = TicketToRideApplication.getInstance();
		return application.getWindow();
	}

	protected String getMessage(final String key) {
		return Messages.getInstance().getMessage(key);
	}

}
